<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  
  //隐式转化
  //分支语句
  var isAdmin=true
  var num1=123  //true
  if(isAdmin){//先将其他类型转化为Boolean//进行语句判断



  }
  if(1){

  }
  
  //隐式转化的规则
  //直观上为孔的值，转成Boolean类型都是false
  //直观上为空的值：0/""/undefined/null->false
  //显示转化
  console.log(Boolean(num1),Boolean(undefined))//true,false
  </script>
</body>
</html>